﻿using System.IO;
using System.Net;
using System.Text;

namespace COMMON.Http
{
    /// <summary>
    /// 响应解析
    /// </summary>
   public class ResponseHelper
    {
        /// <summary>
        /// 获取请求的数据
        /// </summary>
        public static string GetResponseString(HttpWebResponse webresponse)
        {
            using (Stream s = webresponse.GetResponseStream())
            {
                StreamReader reader = new StreamReader(s, Encoding.UTF8);
                return reader.ReadToEnd();
            }
        }
    }
}
